package ui.controller;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.beans.factory.annotation.Autowired;
import model.Game;

import java.util.List;

import dao.GameDao;

/**
 * User: gutnikov
 * Date: 17.09.2010
 */

@Controller
public class MainPageController {

	@Autowired
	GameDao gameDao;

	@RequestMapping("/index.html")
	ModelAndView mainPage(){

		Game g = gameDao.getById(35);

		return new ModelAndView(".index",new ModelMap("game",g));		
	}
}
